home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Users, OpenDoc and memory
- Sent: 6/28/96 9:24 AM
- Received: 7/1/96 8:34 AM
- From: Troy Gaul, tgaul@apple.com
- Reply-To: OpenDoc-Interest@CILabs.ORG
- To: OpenDoc Related Technologies Interest List, OpenDoc-Interest@CILabs
-
- >The Cyberdog library has many fragments merged together
- >(presumably via the MPW tool MergeFragment). Merging
- >code fragments, however, doesn't really combine the data
- >and code sections of each library. Instead, the data forks
- >of each of the libraries are concatenated, and the 'cfrg'
- >resource tracks the sizes and offsets of each fragment within
- >the new, merged shared library file. When the fragment is
- >loaded (via GetSharedLibrary(), GetDiskFragment(), or implicitly),
- >only the relevant section of the file actually gets loaded
- >into memory.
-
- This description is true of merged fragments. However, Cyberdog doesn't
- have such merged fragments in its data fork. It has one code fragment
- which contains all of the parts and the base Cyberdog code.
-
- You can verify this with a tool like DumpPEF. You will see that there
- are many 'containers' (139, actually), but the offset into the file of
- each one is 0 and the length is 2425651. There are multiple cfrg entries
- (one for each container) to satisfy SOM and CFM, but they all point to
- the same main code fragment. Merging fragments is not necessary to do
- this.
-
- If there had been multiple code fragments, even if they are in the same
- file, there would still have been the need for many imports and exports,
- and the size would have been much larger.
-
- _troy
-
- ......................................................................
- Troy Gaul tgaul@apple.com
- Apple Computer, Inc. OpenDoc Partsmith
-
-